package csw;

import java.util.Scanner;

public class J09Sungjuk {

	public static void main(String[] args) {
		
		String name[] = new String[2];   // name[0]
		int kor = 0, eng = 0, mat = 0, tot = 0;
		double avg = 0;
		char grd = 0;
		Scanner sc = null;
		String result = "";

		//성적입력
		inputSungjuk(sc,name, kor , eng, mat);
		//성적처리
		sgetTotal(kor,eng,mat,tot);
		getAverage(kor, eng, mat, tot, avg);
		getGrade(kor, eng, mat, avg, grd);
		
		//결과출력
		System.out.println(name); //중
		System.out.println(name[1]);
		System.out.println(kor);
		System.out.println(eng);
		System.out.println(mat);
		System.out.println(tot);
		System.out.println(avg);
		System.out.println(grd);
		
	}//main

	public static void inputSungjuk(
		Scanner sc, String name[], 
		int kor, int eng, int mat){
	
		
		System.out.println("이름을 입력 하세용");
		name[1] = sc.next();
		System.out.println("국어");
		kor = sc.nextInt();
		System.out.println("영어");
		eng = sc.nextInt();
		System.out.println("수학");
		mat = sc.nextInt();	
		sc.close();
		
	}//inputSungJuk

	public static void sgetTotal(int kor, int eng, int mat, int tot) {

		tot = kor + eng + mat;
	}

	public static void getAverage(int kor, int eng, int mat, int tot, double avg) {
		avg = (double) tot / 3;
	}

	public static void getGrade(int kor, int eng, int mat, double avg, char grd) {
		switch ((int) avg / 10) {
		case 10:
		case 9:
			grd = '수';
			break;
		case 8:
			grd = '우';
			break;
		case 7:
			grd = '미';
			break;
		case 6:
			grd = '양';
			break;
		default:
			grd = '가';

			
		}
	}
	
}


	
	
	


